<!-- head -->
<div class="row wrapper border-bottom white-bg page-heading">
    <div class="col-md-12">
        <ol class="breadcrumb">
            <li><a>主页</a></li>
            <li><a>超级兑(激活版)</a></li>
            <li class="active"><strong>积分产品类别新增</strong></li>
        </ol>
    </div>
</div>

<!-- content-->
<div class="wrapper wrapper-content animated fadeIn" ng-controller="productTypeActivateAddCtrl">
    <form class="form-horizontal" id="form1" name="horizontalCard">
        <div class="form-group">
            <div class="ibox float-e-margins">
                <div class="ibox-content">
                    <div class="ibox-title">
                        <h5>基本资料</h5>
                    </div>
                    <div class="row">
                        <div class="form-group">
                            <label class="col-sm-2 control-label"><i class="red_req">*</i>机构名称:</label>
                            <div class="col-sm-3">
                                <select class="form-control" name="orgCode" required ng-model="info.orgCode" ng-options="x.value as x.text for x in orgList"/>
                                <div class="req_mesg" ng-show="horizontalCard.orgCode.$dirty && horizontalCard.orgCode.$invalid">
                                    <span ng-show="horizontalCard.orgCode.$error.required">机构名称不能为空</span>
                                </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label"><i class="red_req">*</i>产品类别:</label>
                            <div class="col-sm-3">
                                <input type="text" class="form-control" name="typeName" required ng-model="info.typeName">
                                <div class="req_mesg" ng-show="horizontalCard.typeName.$dirty && horizontalCard.typeName.$invalid">
                                    <span ng-show="horizontalCard.typeName.$error.required">产品类别不能为空</span>
                                </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">视频地址:</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control"  ng-model="info.videoUrl">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">兑换教程:</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control"  ng-model="info.courseUrl">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">兑换入口:</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control"  ng-model="info.bankUrl">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">兑换入口跳转提示语:</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control" maxlength="50" ng-model="info.hint">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label"><i class="red_req">*</i>报单方式:</label>
                            <div class="col-sm-2">
                                <select class="form-control"  name="declaraType" required ng-model="info.declaraType" ng-options="x.value as x.text for x in declaraTypeSelect"/>
                                <div class="req_mesg" ng-show="horizontalCard.declaraType.$dirty && horizontalCard.declaraType.$invalid">
                                    <span ng-show="horizontalCard.declaraType.$error.required">报单方式不能为空</span>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="ibox-content">
                    <div class="ibox-title">
                        <h5>资料配置</h5>
                    </div>
                    <div class="form-group">
                        <label class="col-lg-2 control-label">请选择产品配置:</label>
                        <div class="col-lg-10">
                            <div class="col-sm-2" style="margin-top:5px" data-ng-repeat="item in checkboxList">
                                <input type="checkbox" name="{{item.propertyCode}}" ng-checked="item.propertyDefaultValue" ng-model="item.propertyDefaultValue"  />
                                <span>{{item.propertyDesc}}</span>
                            </div>
                        </div>
                    </div>
                    <div class="form-group" data-ng-repeat="imgItem in fileList" >
                        <label class="col-sm-2 control-label">{{imgItem.propertyDesc}}:</label>
                        <div class="col-lg-7">
                            <input type="file" nv-file-select="" uploader="imgItem.uploaderImg"   multiple  />
                            <label style="color:red; float:right;">{{imgItem.propertyRemark}}</label>
                            <table class="table">
                                <tbody>
                                <tr ng-repeat="item in imgItem.uploaderImg.queue">
                                    <td>
                                        <strong>{{ item.file.name }}</strong>
                                        <div ng-show="imgItem.uploaderImg.isHTML5" ng-thumb="{ file: item._file, height: 100 }"></div>
                                    </td>
                                    <td ng-show="imgItem.uploaderImg.isHTML5" nowrap>{{ item.file.size/1024/1024|number:2 }} MB</td>
                                    <td ng-show="imgItem.uploaderImg.isHTML5">
                                        <div class="progress" style="margin-bottom: 0;">
                                            <div class="progress-bar" role="progressbar" ng-style="{ 'width': item.progress + '%' }"></div>
                                        </div>
                                    </td>
                                    <td class="text-center">
                                        <span ng-show="item.isSuccess"><i class="glyphicon glyphicon-ok"></i></span>
                                        <span ng-show="item.isCancel"><i class="glyphicon glyphicon-ban-circle"></i></span>
                                        <span ng-show="item.isError"><i class="glyphicon glyphicon-remove"></i></span>
                                    </td>
                                    <td nowrap>
                                        <button type="button" class="btn btn-danger btn-xs" ng-click="item.remove()">
                                            <span class="glyphicon glyphicon-trash"></span> 删除
                                        </button>
                                    </td>
                                </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                    <div class="form-group" ng-repeat="item in textList">
                        <label class="col-sm-2 control-label">{{item.propertyDesc}}:</label>
                        <div ng-if="item.codeType=='text'">
                            <div class="col-sm-5">
                                <input class="form-control" name="{{item.propertyCode}}" ng-model="item.propertyDefaultValue">
                            </div>
                        </div>
                        <div ng-if="item.codeType!='text'">
                            <div class="col-lg-5">
                                <textarea type="text" class="form-control" summernote ng-model="item.propertyDefaultValue">
                                </textarea>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-lg-12 bgff">
                <div class="col-sm-12">
                    <div class="col-lg-3"></div>
                    <div class="col-sm-6">
                        <button class="btn btn-primary btn-mr20" type="button" ng-click="savetype()" ng-disabled="horizontalCard.$invalid || submitting">提交</button>
                        <a class="btn btn-primary4" ui-sref="exchangeActivate.productType" >返回</a>
                    </div>
                </div>
            </div>
        </div>
    </form>
</div>